
package entities;

import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@Table(name = "report")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Report.findAll", query = "SELECT r FROM Report r"),
    @NamedQuery(name = "Report.findByReportId", query = "SELECT r FROM Report r WHERE r.reportId = :reportId"),
    @NamedQuery(name = "Report.findByIssueDate", query = "SELECT r FROM Report r WHERE r.issueDate = :issueDate"),
    @NamedQuery(name = "Report.findByLocation", query = "SELECT r FROM Report r WHERE r.location = :location"),
    @NamedQuery(name = "Report.findByType", query = "SELECT r FROM Report r WHERE r.type = :type"),
    @NamedQuery(name = "Report.findByFranchise", query = "SELECT r FROM Report r WHERE r.franchise = :franchise"),
    @NamedQuery(name = "Report.findByBranch", query = "SELECT r FROM Report r WHERE r.branch = :branch"),
    @NamedQuery(name = "Report.findByStartDate", query = "SELECT r FROM Report r WHERE r.startDate = :startDate"),
    @NamedQuery(name = "Report.findByEndDate", query = "SELECT r FROM Report r WHERE r.endDate = :endDate"),
    @NamedQuery(name = "Report.findByAmount", query = "SELECT r FROM Report r WHERE r.amount = :amount")})
public class Report implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "reportId")
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Integer reportId;
    @Basic(optional = false)
    @Column(name = "issueDate")
    private String issueDate;
    @Basic(optional = false)
    @Column(name = "location")
    private String location;
    @Basic(optional = false)
    @Column(name = "type")
    private String type;
    @Basic(optional = false)
    @Column(name = "franchise")
    private String franchise;
    @Basic(optional = false)
    @Column(name = "branch")
    private String branch;
    @Column(name = "startDate")
    private String startDate;
    @Column(name = "endDate")
    private String endDate;
    @Column(name = "amount")
    private String amount;

    public Report() {
    }

    public Report(Integer reportId) {
        this.reportId = reportId;
    }

    public Report(Integer reportId, String issueDate, String location, String type, String franchise, String branch) {
        this.reportId = reportId;
        this.issueDate = issueDate;
        this.location = location;
        this.type = type;
        this.franchise = franchise;
        this.branch = branch;
    }

    public Integer getReportId() {
        return reportId;
    }

    public void setReportId(Integer reportId) {
        this.reportId = reportId;
    }

    public String getIssueDate() {
        return issueDate;
    }

    public void setIssueDate(String issueDate) {
        this.issueDate = issueDate;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getFranchise() {
        return franchise;
    }

    public void setFranchise(String franchise) {
        this.franchise = franchise;
    }

    public String getBranch() {
        return branch;
    }

    public void setBranch(String branch) {
        this.branch = branch;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (reportId != null ? reportId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Report)) {
            return false;
        }
        Report other = (Report) object;
        if ((this.reportId == null && other.reportId != null) || (this.reportId != null && !this.reportId.equals(other.reportId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "reporthistory.Report[ reportId=" + reportId + " ]";
    }
    
}
